import functools
from functools import reduce

def log(*text):
    def decorator(func):
        @functools.wraps(func)
        def wrapper(*args, **kwargs):
            if(len(text) != 0):
                print(reduce(lambda x,y: x+y, list(map(str,text))))
            re = func(*args, **kwargs)
            return re
        return wrapper
    return decorator


@log("text")
def dsf():
    print("def")

@log()
def abd():
    print("adc")

dsf()
abd()

